package cn.iocoder.yudao.module.ordering.controller.admin.record.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

@Schema(description = "管理后台 - 餐品-订餐记录 Response VO")
@Data
@ExcelIgnoreUnannotated
public class RecordRespVO {

    @Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "30597")
    @ExcelProperty("编号")
    private Long id;

    @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @ExcelProperty("名称")
    private String name;

    @Schema(description = "餐品类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @ExcelProperty(value = "餐品类型", converter = DictConvert.class)
    @DictFormat("ordering_type") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    private String type;

    @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "11368")
    @ExcelProperty("价格")
    private BigDecimal price;

    @Schema(description = "图片", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("图片")
    private String picture;

    @Schema(description = "状态，0已订餐，1已送餐，2已取餐，3用户取消，4系统取消", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    @ExcelProperty("状态，0已订餐，1已送餐，2已取餐，3用户取消，4系统取消")
    private Integer status;

    @Schema(description = "预定日期", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("预定日期")
    private LocalDateTime orderDate;

    @Schema(description = "用户昵称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("用户昵称")
    private String userName;

    @Schema(description = "部门名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五")
    @ExcelProperty("部门名称")
    private String deptName;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "分类统计时的餐品数量")
    private Integer itemNum;

    @Schema(description = "分类统计时的餐品详情")
    private Map itemList;

}
